Optimal. Leaf size=134 \[ \frac {g (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{d i}+\frac {(b c-a d) g \left (A+B n+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right )}{d^2 i}+\frac {B (b c-a d) g n \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^2 i} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {2561, 2384,
2354, 2438} \begin {gather*} \frac {B g n (b c-a d) \text {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^2 i}+\frac {g (b c-a d) \log \left (\frac {b c-a d}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A+B n\right )}{d^2 i}+\frac {g (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d i} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2354
Rule 2384
Rule 2438
Rule 2561
Rubi steps
\begin {align*} \int \frac {(a g+b g x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{137 c+137 d x} \, dx &=\int \left (\frac {b g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{137 d}+\frac {(-b c+a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{137 d (c+d x)}\right ) \, dx\\ &=\frac {(b g) \int \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx}{137 d}-\frac {((b c-a d) g) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c+d x} \, dx}{137 d}\\ &=\frac {A b g x}{137 d}-\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{137 d^2}+\frac {(b B g) \int \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx}{137 d}+\frac {(B (b c-a d) g n) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (c+d x)}{a+b x} \, dx}{137 d^2}\\ &=\frac {A b g x}{137 d}+\frac {B g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{137 d}-\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{137 d^2}+\frac {(B (b c-a d) g n) \int \left (\frac {b \log (c+d x)}{a+b x}-\frac {d \log (c+d x)}{c+d x}\right ) \, dx}{137 d^2}-\frac {(B (b c-a d) g n) \int \frac {1}{c+d x} \, dx}{137 d}\\ &=\frac {A b g x}{137 d}+\frac {B g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{137 d}-\frac {B (b c-a d) g n \log (c+d x)}{137 d^2}-\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{137 d^2}+\frac {(b B (b c-a d) g n) \int \frac {\log (c+d x)}{a+b x} \, dx}{137 d^2}-\frac {(B (b c-a d) g n) \int \frac {\log (c+d x)}{c+d x} \, dx}{137 d}\\ &=\frac {A b g x}{137 d}+\frac {B g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{137 d}-\frac {B (b c-a d) g n \log (c+d x)}{137 d^2}+\frac {B (b c-a d) g n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{137 d^2}-\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{137 d^2}-\frac {(B (b c-a d) g n) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{137 d^2}-\frac {(B (b c-a d) g n) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{137 d}\\ &=\frac {A b g x}{137 d}+\frac {B g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{137 d}-\frac {B (b c-a d) g n \log (c+d x)}{137 d^2}+\frac {B (b c-a d) g n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{137 d^2}-\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{137 d^2}-\frac {B (b c-a d) g n \log ^2(c+d x)}{274 d^2}-\frac {(B (b c-a d) g n) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{137 d^2}\\ &=\frac {A b g x}{137 d}+\frac {B g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{137 d}-\frac {B (b c-a d) g n \log (c+d x)}{137 d^2}+\frac {B (b c-a d) g n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{137 d^2}-\frac {(b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{137 d^2}-\frac {B (b c-a d) g n \log ^2(c+d x)}{274 d^2}+\frac {B (b c-a d) g n \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{137 d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 170, normalized size = 1.27 \begin {gather*} \frac {g \left (2 A b d x+2 B d (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-2 B (b c-a d) n \log (c+d x)-2 (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)+B (b c-a d) n \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{2 d^2 i} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.20, size = 0, normalized size = 0.00 \[\int \frac {\left (b g x +a g \right ) \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}{d i x +c i}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 289 vs. \(2 (129) = 258\).
time = 0.56, size = 289, normalized size = 2.16 \begin {gather*} A b g {\left (-\frac {i \, x}{d} + \frac {i \, c \log \left (d x + c\right )}{d^{2}}\right )} - \frac {i \, A a g \log \left (i \, d x + i \, c\right )}{d} - \frac {{\left (-i \, b c g n + i \, a d g n\right )} {\left (\log \left (b x + a\right ) \log \left (\frac {b d x + a d}{b c - a d} + 1\right ) + {\rm Li}_2\left (-\frac {b d x + a d}{b c - a d}\right )\right )} B}{d^{2}} - \frac {{\left (b c g {\left (-i \, n - i\right )} + i \, a d g\right )} B \log \left (d x + c\right )}{d^{2}} + \frac {-2 i \, B a d g n \log \left (b x + a\right ) - 2 i \, B b d g x - 2 \, {\left (i \, b c g n - i \, a d g n\right )} B \log \left (b x + a\right ) \log \left (d x + c\right ) + {\left (i \, b c g n - i \, a d g n\right )} B \log \left (d x + c\right )^{2} - 2 \, {\left (i \, B b d g x + {\left (-i \, b c g + i \, a d g\right )} B \log \left (d x + c\right )\right )} \log \left ({\left (b x + a\right )}^{n}\right ) - 2 \, {\left (-i \, B b d g x + {\left (i \, b c g - i \, a d g\right )} B \log \left (d x + c\right )\right )} \log \left ({\left (d x + c\right )}^{n}\right )}{2 \, d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {g \left (\int \frac {A a}{c + d x}\, dx + \int \frac {A b x}{c + d x}\, dx + \int \frac {B a \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c + d x}\, dx + \int \frac {B b x \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c + d x}\, dx\right )}{i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1279 vs. \(2 (129) = 258\).
time = 75.17, size = 1279, normalized size = 9.54 \begin {gather*} -\frac {1}{6} \, {\left (\frac {{\left (-i \, B b^{5} c^{4} g n + 4 i \, B a b^{4} c^{3} d g n - \frac {3 \, {\left (-i \, b x - i \, a\right )} B b^{4} c^{4} d g n}{d x + c} - 6 i \, B a^{2} b^{3} c^{2} d^{2} g n - \frac {12 \, {\left (i \, b x + i \, a\right )} B a b^{3} c^{3} d^{2} g n}{d x + c} + 4 i \, B a^{3} b^{2} c d^{3} g n - \frac {18 \, {\left (-i \, b x - i \, a\right )} B a^{2} b^{2} c^{2} d^{3} g n}{d x + c} - i \, B a^{4} b d^{4} g n - \frac {12 \, {\left (i \, b x + i \, a\right )} B a^{3} b c d^{4} g n}{d x + c} - \frac {3 \, {\left (-i \, b x - i \, a\right )} B a^{4} d^{5} g n}{d x + c}\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b^{3} d^{2} - \frac {3 \, {\left (b x + a\right )} b^{2} d^{3}}{d x + c} + \frac {3 \, {\left (b x + a\right )}^{2} b d^{4}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{3} d^{5}}{{\left (d x + c\right )}^{3}}} + \frac {\frac {{\left (-i \, b x - i \, a\right )} B b^{5} c^{4} d g n}{d x + c} - \frac {4 \, {\left (-i \, b x - i \, a\right )} B a b^{4} c^{3} d^{2} g n}{d x + c} + \frac {i \, {\left (b x + a\right )}^{2} B b^{4} c^{4} d^{2} g n}{{\left (d x + c\right )}^{2}} - \frac {6 \, {\left (i \, b x + i \, a\right )} B a^{2} b^{3} c^{2} d^{3} g n}{d x + c} - \frac {4 i \, {\left (b x + a\right )}^{2} B a b^{3} c^{3} d^{3} g n}{{\left (d x + c\right )}^{2}} - \frac {4 \, {\left (-i \, b x - i \, a\right )} B a^{3} b^{2} c d^{4} g n}{d x + c} + \frac {6 i \, {\left (b x + a\right )}^{2} B a^{2} b^{2} c^{2} d^{4} g n}{{\left (d x + c\right )}^{2}} + \frac {{\left (-i \, b x - i \, a\right )} B a^{4} b d^{5} g n}{d x + c} - \frac {4 i \, {\left (b x + a\right )}^{2} B a^{3} b c d^{5} g n}{{\left (d x + c\right )}^{2}} + \frac {i \, {\left (b x + a\right )}^{2} B a^{4} d^{6} g n}{{\left (d x + c\right )}^{2}} - i \, A b^{6} c^{4} g - i \, B b^{6} c^{4} g + 4 i \, A a b^{5} c^{3} d g + 4 i \, B a b^{5} c^{3} d g - \frac {3 \, {\left (-i \, b x - i \, a\right )} A b^{5} c^{4} d g}{d x + c} - \frac {3 \, {\left (-i \, b x - i \, a\right )} B b^{5} c^{4} d g}{d x + c} - 6 i \, A a^{2} b^{4} c^{2} d^{2} g - 6 i \, B a^{2} b^{4} c^{2} d^{2} g - \frac {12 \, {\left (i \, b x + i \, a\right )} A a b^{4} c^{3} d^{2} g}{d x + c} - \frac {12 \, {\left (i \, b x + i \, a\right )} B a b^{4} c^{3} d^{2} g}{d x + c} + 4 i \, A a^{3} b^{3} c d^{3} g + 4 i \, B a^{3} b^{3} c d^{3} g - \frac {18 \, {\left (-i \, b x - i \, a\right )} A a^{2} b^{3} c^{2} d^{3} g}{d x + c} - \frac {18 \, {\left (-i \, b x - i \, a\right )} B a^{2} b^{3} c^{2} d^{3} g}{d x + c} - i \, A a^{4} b^{2} d^{4} g - i \, B a^{4} b^{2} d^{4} g - \frac {12 \, {\left (i \, b x + i \, a\right )} A a^{3} b^{2} c d^{4} g}{d x + c} - \frac {12 \, {\left (i \, b x + i \, a\right )} B a^{3} b^{2} c d^{4} g}{d x + c} - \frac {3 \, {\left (-i \, b x - i \, a\right )} A a^{4} b d^{5} g}{d x + c} - \frac {3 \, {\left (-i \, b x - i \, a\right )} B a^{4} b d^{5} g}{d x + c}}{b^{4} d^{2} - \frac {3 \, {\left (b x + a\right )} b^{3} d^{3}}{d x + c} + \frac {3 \, {\left (b x + a\right )}^{2} b^{2} d^{4}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{3} b d^{5}}{{\left (d x + c\right )}^{3}}} - \frac {{\left (i \, B b^{4} c^{4} g n - 4 i \, B a b^{3} c^{3} d g n + 6 i \, B a^{2} b^{2} c^{2} d^{2} g n - 4 i \, B a^{3} b c d^{3} g n + i \, B a^{4} d^{4} g n\right )} \log \left (b - \frac {{\left (b x + a\right )} d}{d x + c}\right )}{b^{2} d^{2}} - \frac {{\left (-i \, B b^{4} c^{4} g n + 4 i \, B a b^{3} c^{3} d g n - 6 i \, B a^{2} b^{2} c^{2} d^{2} g n + 4 i \, B a^{3} b c d^{3} g n - i \, B a^{4} d^{4} g n\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b^{2} d^{2}}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )}^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (a\,g+b\,g\,x\right )\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}{c\,i+d\,i\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________